package org.clever.dubbo;

import com.alibaba.dubbo.config.spring.context.annotation.DubboComponentScan;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ApplicationContext;

import java.util.TimeZone;

/**
 * 作者： lzw<br/>
 * 创建时间：2018-09-26 17:41 <br/>
 */
@DubboComponentScan(basePackages = {"org.clever.dubbo.service"})
@SpringBootApplication
@Slf4j
public class DubboProviderDemo {

    public static void main(String[] args) {
        TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));

//        new EmbeddedZooKeeper(2181, false).start();

        ApplicationContext ctx = new SpringApplicationBuilder(DubboProviderDemo.class)
                .web(WebApplicationType.NONE)
                .run(args);
        log.info("### 服务启动完成 === " + ctx);
    }
}